#include "adddialog.h"
#include "ui_adddialog.h"
#include <QDebug>

AddDialog::AddDialog(QWidget *parent, QTreeWidgetItem *item) :
    QDialog(parent),
    ui(new Ui::AddDialog)
{
    ui->setupUi(this);
    this->item = item;
}

AddDialog::~AddDialog()
{
    delete ui;
}

void AddDialog::on_buttonBox_accepted()
{
    qDebug()<< "add";
    emit this->doneAddItem(this->item, ui->lineEdit->text());
    this->close();
}
